﻿<phone:PhoneApplicationPage 
    x:Class="WeiTalk.MessagePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:c ="clr-namespace:WeiTalk.Controls"
     xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True" Loaded="PhoneApplicationPage_Loaded">
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar x:Name="applicationBar" Mode="Minimized" Opacity="0.845" BackgroundColor="#FF232323">
            <shell:ApplicationBarIconButton x:Name="mibtnRefresh" IconUri="/Images/appbar.refresh.rest.png" Text="刷新" Click="mibtnRefresh_Click"/>
            <shell:ApplicationBarIconButton  IconUri="/Images/appbar.download.rest.png" Text="加载图片" IsEnabled="False" Click="ImageViewer_Click" />
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Grid x:Name="LayoutRoot" Background="#FF1BA1E2">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel 包含应用程序的名称和页标题-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="0,5,0,0">
            <TextBlock x:Name="ApplicationTitle" Text="信息..." Margin="12,0,12,0" FontSize="21.333" FontStyle="Italic" FontFamily="Symbol" Foreground="#FFD4D4D4"/>
        </StackPanel>

        <!--ContentPanel - 在此处放置其他内容-->
        <Grid x:Name="ContentPanel" Grid.Row="1"   Margin="0">
            <controls:Pivot SelectionChanged="Pivot_SelectionChanged" x:Name="pMessage">
                <controls:PivotItem Margin="0,12,0,0" x:Name="piAtMe">
                    <controls:PivotItem.Header>
                        <TextBlock Text="@我" FontSize="32" x:Name="AtMe"/>
                    </controls:PivotItem.Header>
                    <ScrollViewer Name="svAtMeTimeLine" VerticalAlignment="Top" BorderThickness="0,0,0,0"  ManipulationCompleted="svAtMeTimeLine_ManipulationCompleted" MouseMove="svatMeTimeLine_MouseMove" ManipulationStarted="svAtMeTimeLine_ManipulationStarted">
                        <StackPanel x:Name="spContent" Width="470">
                            <c:PullAndDownControl x:Name="pullAndDownControl" Margin="0,-50,0,20"/>
                            
                        </StackPanel>
                    </ScrollViewer>
                </controls:PivotItem>

                <controls:PivotItem x:Name="piPersonalMessage" Margin="12,0">
                    <controls:PivotItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="私信" FontSize="32"/>
                            <Image Source="/Images/personal.png"/>
                        </StackPanel>
                    </controls:PivotItem.Header>
                    <!--<Grid x:Name="gPeople">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <StackPanel x:Name="SearchPanel"  Orientation="Horizontal" >
                            <TextBox x:Name="tbSearch" BorderThickness="0" Margin="0,0,0,0" Width="400" ToolTipService.ToolTip="输入朋友名称进行查找..." />
                            <Button Width="80" x:Name="btnSearch" BorderThickness="1" Margin="-20,0,0,0" Click="btnSearch_Click" FontSize="24" Padding="0" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" Height="66" VerticalAlignment="Bottom" BorderBrush="White">
                            	<Button.Background>
                            		<ImageBrush ImageSource="/Images/appbar.feature.search.rest.png" Stretch="Uniform"/>
                            	</Button.Background>
                            </Button>
                        </StackPanel>
                        <ScrollViewer x:Name="svPeople" Grid.Row="1" Margin="0,0,0,0" >
                            <StackPanel x:Name="spPeople">
                                
                            </StackPanel>
                        </ScrollViewer>
                    </Grid>-->
                </controls:PivotItem>

                <!--<controls:PivotItem x:Name="piRecentlyPersonalMessage" Margin="12,0">
                    <controls:PivotItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="会话" FontSize="32"/>
                            <Image Source="/Images/personal.png"/>
                        </StackPanel>
                    </controls:PivotItem.Header>
                    <StackPanel x:Name="spRecentlyPeopleMessages">
                        
                    </StackPanel>
                </controls:PivotItem>-->
            </controls:Pivot>
        </Grid>
    </Grid>
 
    <!--演示 ApplicationBar 用法的示例代码-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="按钮 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="按钮 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="菜单项 1"/>
                <shell:ApplicationBarMenuItem Text="菜单项 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>
